package org.openwebtop.common.aop.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * AOP Retry Annotation
 *
 * <br>
 * <br><i>Default count : 3</i>
 *
 * @author Jaehyeon Nam
 * @Since 2010. 1. 12.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target( {ElementType.METHOD})
public @interface RetryOnException{
	/**
	 * 재시도 횟수
	 *
	 * @return 재시도 횟수
	 */
	int count() default 3;

	/**
	 * Retry할 Exception Type
	 *
	 * @return Retry할 Exception Type
	 */
	Class<? extends Throwable> exception() default Exception.class;
}
